﻿using MoetutuServer.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace MoetutuServer.WebSite.Huaban
{
    class HuabanStaticValue
    {
        public static string ImgApi = "https://huaban.com/from/pixiv.net/?limit=20&wfl=1";
        public static string LogFloderPath = StaticValue.TempPath+"HuabnLog\\";
        public static string LogFilePath = StaticValue.TempPath + "HuabnLog\\" + DateTime.Now.ToString("yyyy年MM月dd")+".txt";
        public static WebHeaderCollection HuabanHeader() {
            WebHeaderCollection webHeaderCollection = StaticValue.CurrencyWebHeader();
            webHeaderCollection.Add("Accept", "application/json");
            webHeaderCollection.Add("X-Request", "JSON");
            webHeaderCollection.Add("X-Requested-With", "XMLHttpRequest");
            return webHeaderCollection;

        }
        public class HuabanListJson {
            public class ColorsItem
            {
                /// <summary>
                /// 
                /// </summary>
                public int color { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public double ratio { get; set; }
            }

            public class File
            {
                /// <summary>
                /// 
                /// </summary>
                public int id { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string farm { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string bucket { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string key { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string type { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int height { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string frames { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int width { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public List<ColorsItem> colors { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string theme { get; set; }
            }

            public class Text_meta
            {
                /// <summary>
                /// 
                /// </summary>
                public List<string> tags { get; set; }
            }

            public class Avatar
            {
                /// <summary>
                /// 
                /// </summary>
                public int id { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string farm { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string bucket { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string key { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string type { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int width { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int height { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int frames { get; set; }
            }

            public class User
            {
                /// <summary>
                /// 
                /// </summary>
                public int user_id { get; set; }
                /// <summary>
                /// 卐﹏时钟兔兔づ
                /// </summary>
                public string username { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string urlname { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int created_at { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public Avatar avatar { get; set; }
                /// <summary>
                /// 
                /// </summary>
            //    public string extra { get; set; }
            }

            public class Cover
            {
                /// <summary>
                /// 
                /// </summary>
                public string pin_id { get; set; }
            }

            public class Extra
            {
                /// <summary>
                /// 
                /// </summary>
                public Cover cover { get; set; }
            }

            public class Board
            {
                /// <summary>
                /// 
                /// </summary>
                public int board_id { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int user_id { get; set; }
                /// <summary>
                /// 动漫、二次元集
                /// </summary>
                public string title { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string description { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string category_id { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int seq { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int pin_count { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int follow_count { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int like_count { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int created_at { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int updated_at { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int deleting { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int is_private { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public Extra extra { get; set; }
            }

    

            public class Via_user
            {
                /// <summary>
                /// 
                /// </summary>
                public int user_id { get; set; }
                /// <summary>
                /// 追寻谁的身影
                /// </summary>
                public string username { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string urlname { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int created_at { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public Avatar avatar { get; set; }
                /// <summary>
                /// 
                /// </summary>
           //     public string extra { get; set; }
            }

            public class PinsItem
            {
                /// <summary>
                /// 
                /// </summary>
                public int pin_id { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int user_id { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int board_id { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int file_id { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public File file { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int media_type { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string source { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string link { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string raw_text { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public Text_meta text_meta { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int via { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int via_user_id { get; set; }
                /// <summary>
                /// 
                /// </summary>
               // public int original { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int created_at { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int like_count { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int comment_count { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int repin_count { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public int is_private { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string extra { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string orig_source { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public User user { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public Board board { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public Via_user via_user { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public List<string> tags { get; set; }
            }

            public class Suggests
            {
            }

            public class Root
            {
                /// <summary>
                /// 
                /// </summary>
                public string filter { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public List<PinsItem> pins { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string explore { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string promotions { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public Suggests suggests { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string banner_box_promotion { get; set; }
                /// <summary>
                /// 
                /// </summary>
                public string query { get; set; }
            }

        }
    }
}
